
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class JuBoWidget {

  // 加载
  static Widget loadingWidget (){
        return Scaffold(
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                CupertinoActivityIndicator(
                  radius: 15,
                ),
                SizedBox(height: 20,),
                Text('聚玻宝正在加载')
              ],
            ),
          ),
        );
      }

  // 加载
  static Widget imageTitle (icon,title,double w){
    return Column(
        children: <Widget>[
          Image.asset(icon,width: w,),
          SizedBox(height: 5,),
          Text(title)
        ],
    );
  }

}

class LinePainter extends CustomPainter {
  Paint _paint = Paint()
    ..color = Colors.black
    ..strokeCap = StrokeCap.square
    ..isAntiAlias = true
    ..strokeWidth = 3.0
    ..style = PaintingStyle.stroke;

  @override
  void paint(Canvas canvas, Size size) {
    // TODO: implement paint
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    // TODO: implement shouldRepaint
    return false;
  }
}
